const fs = require("fs");
const path = require("path");
//同步方法
var filePath = path.join(__dirname,"2.txt");
var fd = fs.openSync(filePath,"read");
var buf = Buffer.alloc(10);
var result = fs.readSync(fd,buf)